Optimal. Leaf size=191 \[ \frac {c^5 (A+8 i B) \tan (e+f x)}{a^3 f}-\frac {8 c^5 (3 A+7 i B)}{a^3 f (-\tan (e+f x)+i)}+\frac {8 c^5 (-3 B+2 i A)}{a^3 f (-\tan (e+f x)+i)^2}+\frac {16 c^5 (A+i B)}{3 a^3 f (-\tan (e+f x)+i)^3}-\frac {8 c^5 (-4 B+i A) \log (\cos (e+f x))}{a^3 f}-\frac {8 c^5 x (A+4 i B)}{a^3}+\frac {B c^5 \tan ^2(e+f x)}{2 a^3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.24, antiderivative size = 191, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac {c^5 (A+8 i B) \tan (e+f x)}{a^3 f}-\frac {8 c^5 (3 A+7 i B)}{a^3 f (-\tan (e+f x)+i)}+\frac {8 c^5 (-3 B+2 i A)}{a^3 f (-\tan (e+f x)+i)^2}+\frac {16 c^5 (A+i B)}{3 a^3 f (-\tan (e+f x)+i)^3}-\frac {8 c^5 (-4 B+i A) \log (\cos (e+f x))}{a^3 f}-\frac {8 c^5 x (A+4 i B)}{a^3}+\frac {B c^5 \tan ^2(e+f x)}{2 a^3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int \frac {(A+B \tan (e+f x)) (c-i c \tan (e+f x))^5}{(a+i a \tan (e+f x))^3} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(A+B x) (c-i c x)^4}{(a+i a x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {(A+8 i B) c^4}{a^4}+\frac {B c^4 x}{a^4}+\frac {16 (A+i B) c^4}{a^4 (-i+x)^4}+\frac {16 (-2 i A+3 B) c^4}{a^4 (-i+x)^3}-\frac {8 (3 A+7 i B) c^4}{a^4 (-i+x)^2}+\frac {8 i (A+4 i B) c^4}{a^4 (-i+x)}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {8 (A+4 i B) c^5 x}{a^3}-\frac {8 (i A-4 B) c^5 \log (\cos (e+f x))}{a^3 f}+\frac {16 (A+i B) c^5}{3 a^3 f (i-\tan (e+f x))^3}+\frac {8 (2 i A-3 B) c^5}{a^3 f (i-\tan (e+f x))^2}-\frac {8 (3 A+7 i B) c^5}{a^3 f (i-\tan (e+f x))}+\frac {(A+8 i B) c^5 \tan (e+f x)}{a^3 f}+\frac {B c^5 \tan ^2(e+f x)}{2 a^3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 11.67, size = 1496, normalized size = 7.83 \[ \text {result too large to display} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 269, normalized size = 1.41 \[ -\frac {48 \, {\left (A + 4 i \, B\right )} c^{5} f x e^{\left (10 i \, f x + 10 i \, e\right )} - {\left (8 i \, A - 32 \, B\right )} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} - {\left (-2 i \, A + 8 \, B\right )} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - {\left (2 i \, A - 2 \, B\right )} c^{5} + {\left (96 \, {\left (A + 4 i \, B\right )} c^{5} f x - {\left (24 i \, A - 96 \, B\right )} c^{5}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (48 \, {\left (A + 4 i \, B\right )} c^{5} f x - {\left (36 i \, A - 144 \, B\right )} c^{5}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} - {\left ({\left (-24 i \, A + 96 \, B\right )} c^{5} e^{\left (10 i \, f x + 10 i \, e\right )} + {\left (-48 i \, A + 192 \, B\right )} c^{5} e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (-24 i \, A + 96 \, B\right )} c^{5} e^{\left (6 i \, f x + 6 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{3 \, {\left (a^{3} f e^{\left (10 i \, f x + 10 i \, e\right )} + 2 \, a^{3} f e^{\left (8 i \, f x + 8 i \, e\right )} + a^{3} f e^{\left (6 i \, f x + 6 i \, e\right )}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 5.71, size = 515, normalized size = 2.70 \[ -\frac {2 \, {\left (\frac {15 \, {\left (4 i \, A c^{5} - 16 \, B c^{5}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{3}} - \frac {15 \, {\left (8 i \, A c^{5} - 32 \, B c^{5}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a^{3}} - \frac {15 \, {\left (-4 i \, A c^{5} + 16 \, B c^{5}\right )} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a^{3}} - \frac {15 \, {\left (6 i \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 24 \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 8 i \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 12 i \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 49 \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 8 i \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 6 i \, A c^{5} - 24 \, B c^{5}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a^{3}} + \frac {294 i \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 1176 \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1884 \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 7416 i \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 4890 i \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 19320 \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 6920 \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 26480 i \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 4890 i \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 19320 \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1884 \, A c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 7416 i \, B c^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 294 i \, A c^{5} + 1176 \, B c^{5}}{a^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{6}}\right )}}{15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.25, size = 244, normalized size = 1.28 \[ \frac {c^{5} A \tan \left (f x +e \right )}{f \,a^{3}}+\frac {8 i c^{5} B \tan \left (f x +e \right )}{f \,a^{3}}+\frac {B \,c^{5} \left (\tan ^{2}\left (f x +e \right )\right )}{2 a^{3} f}+\frac {16 i c^{5} A}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {24 c^{5} B}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {56 i c^{5} B}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )}+\frac {24 c^{5} A}{f \,a^{3} \left (\tan \left (f x +e \right )-i\right )}-\frac {16 c^{5} A}{3 f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{3}}-\frac {16 i c^{5} B}{3 f \,a^{3} \left (\tan \left (f x +e \right )-i\right )^{3}}+\frac {8 i c^{5} A \ln \left (\tan \left (f x +e \right )-i\right )}{f \,a^{3}}-\frac {32 c^{5} B \ln \left (\tan \left (f x +e \right )-i\right )}{f \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.98, size = 233, normalized size = 1.22 \[ \frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,\left (-\frac {32\,B\,c^5}{a^3}+\frac {A\,c^5\,8{}\mathrm {i}}{a^3}\right )}{f}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {c^5\,\left (A+B\,4{}\mathrm {i}\right )}{a^3}+\frac {B\,c^5\,4{}\mathrm {i}}{a^3}\right )}{f}+\frac {\frac {5\,\left (-32\,B\,c^5+A\,c^5\,8{}\mathrm {i}\right )}{3\,a^3}+\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {\left (-32\,B\,c^5+A\,c^5\,8{}\mathrm {i}\right )\,4{}\mathrm {i}}{a^3}+\frac {B\,c^5\,40{}\mathrm {i}}{a^3}\right )-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {3\,\left (-32\,B\,c^5+A\,c^5\,8{}\mathrm {i}\right )}{a^3}+\frac {40\,B\,c^5}{a^3}\right )+\frac {16\,B\,c^5}{a^3}}{f\,\left (-{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}+1\right )}+\frac {B\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,a^3\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.82, size = 476, normalized size = 2.49 \[ \frac {2 i A c^{5} - 16 B c^{5} + \left (2 i A c^{5} e^{2 i e} - 14 B c^{5} e^{2 i e}\right ) e^{2 i f x}}{a^{3} f e^{4 i e} e^{4 i f x} + 2 a^{3} f e^{2 i e} e^{2 i f x} + a^{3} f} + \begin {cases} - \frac {\left (\left (- 2 i A a^{6} c^{5} f^{2} e^{6 i e} + 2 B a^{6} c^{5} f^{2} e^{6 i e}\right ) e^{- 6 i f x} + \left (6 i A a^{6} c^{5} f^{2} e^{8 i e} - 12 B a^{6} c^{5} f^{2} e^{8 i e}\right ) e^{- 4 i f x} + \left (- 18 i A a^{6} c^{5} f^{2} e^{10 i e} + 54 B a^{6} c^{5} f^{2} e^{10 i e}\right ) e^{- 2 i f x}\right ) e^{- 12 i e}}{3 a^{9} f^{3}} & \text {for}\: 3 a^{9} f^{3} e^{12 i e} \neq 0 \\x \left (- \frac {- 16 A c^{5} - 64 i B c^{5}}{a^{3}} + \frac {i \left (16 i A c^{5} e^{6 i e} - 12 i A c^{5} e^{4 i e} + 8 i A c^{5} e^{2 i e} - 4 i A c^{5} - 64 B c^{5} e^{6 i e} + 36 B c^{5} e^{4 i e} - 16 B c^{5} e^{2 i e} + 4 B c^{5}\right ) e^{- 6 i e}}{a^{3}}\right ) & \text {otherwise} \end {cases} - \frac {8 i c^{5} \left (A + 4 i B\right ) \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{3} f} - \frac {x \left (16 A c^{5} + 64 i B c^{5}\right )}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________